function timeout(delay = 1000) {
  return new Promise((resolve) => setTimeout(resolve, delay));
}

timeout(2000)
  .then((_) => {
    return timeout(20000);
  })
  .then((value) => {
    console.log('2000');
  });
